# Contributor: TBK <alpine@jjtc.eu>
# Maintainer: TBK <alpine@jjtc.eu>
pkgname=prometheus-rethinkdb-exporter
pkgver=1.0
pkgrel=1
pkgdesc="Prometheus exporter for RethinkDB"
url="https://github.com/rethinkdb/prometheus-exporter"
arch="all"
license="Apache-2.0"
options="!check" # No test suite
makedepends="go"
subpackages="$pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/rethinkdb/prometheus-exporter/archive/v$pkgver.tar.gz
	prometheus-rethinkdb-exporter.initd
	"
builddir="$srcdir/prometheus-exporter-$pkgver"

build() {
	make
}

package() {
	install -Dm755 rethinkdb-exporter "$pkgdir"/usr/bin/$pkgname

	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
}

sha512sums="0b01a87bdd3432ff26d4c3befa616c889302903a9c1a0ef978d5c801a2fa69f274a242155bef9fac488e8c8a811b11d9429c1834df38afeffa227dc451ab874e  prometheus-rethinkdb-exporter-1.0.tar.gz
478eb2d38c97f30f32eae814221a477fb094bdf19e48748b731a67cd9359f4009ab4e47369b02b8744c52be209c941d80c564c9c92d714ad15592e1193f19aa0  prometheus-rethinkdb-exporter.initd"
